home *** CD-ROM | disk | FTP | other *** search
/ Aminet 30 / Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso / Aminet / comm / irc / soundamirx.lha / sound.amirx next >
Text File  |  1999-02-03  |  2KB  |  90 lines

  1. /*
  2. Sound.AmIRX Version 0.9
  3. Installation:
  4. put this is amirc/rexx/
  5. configure it..
  6. type /alias sound /rx sound.amirx %p
  7. save your settings
  8. Enjoy!
  9. */
  10. Options Results
  11. signal on syntax
  12. script='Sound'
  13. colour=1
  14.  
  15. /* CONFIGURATION STARTS HERE */
  16. PlayPath="C:Play16" /* Put your play16 path and filename here */
  17. SoundDir="DH2:AmIRCSounds" /* Your sounds directory WITHOUT a trailing "/" */
  18. Text="DH0:Utilities/MultiView" /* Put your multiview/more path and filename here */
  19. /* CONFIGURATION STOPS HERE */
  20. /* PLEASE DO NOT CHANGE THE LINES BELOW */
  21.  
  22. getmynick
  23. mynick=result
  24. getchannel
  25. channel=result
  26. Usage="Usage: /sound <wavfile without .wav> <action>"
  27. if channel = "" then signal nojoin
  28. parse arg argu1 argu2
  29. snd=argu1
  30. action=argu2
  31. if snd = "list" then signal list
  32. if ~exists(""PlayPath"") then signal noplay
  33. if argu1 = "" then signal noargs
  34. if ~exists(""SoundDir"/"snd".wav") then signal nofile
  35. cecho(""mynick" [playing "snd".wav]"action"")
  36. "raw privmsg "channel" :sound "snd".wav"action""
  37. address command ""PlayPath" "SoundDir"/"snd".wav"
  38. exit
  39.  
  40. noargs:
  41. cecho("You need to at least type something in!")
  42. cecho(""usage"")
  43. exit
  44.  
  45. nofile:
  46. cecho("File "snd".wav Does Not Exist! Try Checking the Spelling!")
  47. cecho("You may have entered in the sound path incorrectly..")
  48. cecho("Remember not to add .wav in the filename")
  49. cecho(""usage"")
  50. cecho("For a list of all your sounds, type /sound list")
  51. exit
  52.  
  53. noplay:
  54. cecho("You do not have Play16 Or the File/Path is Mis-Spelt")
  55. cecho("Please check to see if you have made a mistake")
  56. cecho("Play16 is available from any aminet site")
  57. exit
  58.  
  59. nojoin:
  60. cecho("Join a channel first you idiot!!")
  61. exit
  62.  
  63. list:
  64. fname = "Ram:temp"
  65. address command "c:dir "SoundDir"" ">ram:temp"
  66. call open("Input", fname, 'R')
  67. flist = readln("Input")
  68. address command ""Text" "fname""
  69. call close("Input")
  70. address command "c:delete "fname""
  71. exit
  72.  
  73. bold:
  74. return '02'x||arg(1)||'02'x
  75.  
  76. underline:
  77. return '1F'x||arg(1)||'1F'x
  78.  
  79. inverse:
  80. return '16'x||arg(1)||'16'x
  81.  
  82. cecho:
  83. "ECHO P="d2c(27)"b«"script"» C="colour arg(1)
  84. return 0
  85.  
  86. syntax:
  87. cecho("Command on line" SIGL "returned" RC ":" errortext(rc) sourceline(SIGL))
  88. exit
  89.  
  90.